<h3>{$uploadfeedback|default:'Upload File'}</h3>
{if isset($smarty.get.id)}

<form name="cours" method="POST" ENCTYPE="multipart/form-data"
	action="index.php?traveau=4&idcour={$smarty.get.idcour}&id={$smarty.get.id}"
	id="formt">
	{else}
	<form name="cours" method="POST" ENCTYPE="multipart/form-data"
		action="index.php?traveau=2" id="formt">
		{/if}
		<div id="feedback">{$feedback|default:''}</div>

		<p id="forcours" style="display: block">
			<label style="width: 150px; margin-right: 20px" for="form_cours">cours:
			</label> <select id="cours" name="cours"> {foreach from=$coursprof
				key=k item=val} {if isset($smarty.get.idcour) && $smarty.get.idcour
				== {$k}}
				<option class="canbedeleted" value="{$k}" selected="selected">{$val}</option>

				{else}
				<option class="canbedeleted" value="{$k}">{$val}</option> {/if}
				{/foreach}
			</select>
		</p>
		<div style="clear: both;">
			<label style="width: 150px; margin-right: 20px">Titre</label> <input
				type="text" name="titre" id="titre"
				value="{$titretravaux|default:''}" />
		</div>
		<br />

		<div style="clear: both;">
			<label style="width: 150px; margin-right: 20px">Tipe de travaux</label>
			<input type="text" name="type" id="type"
				value="{$tipetravaux|default:''}" />
		</div>
		<br />
		<div style="clear: both;">
			<label style="width: 150px; margin-right: 20px">Description</label>
			<textarea style="width: 300px; margin-top: 20px;" rows="10" cols="30"
				name="desc" id="desc">{$desctravaux|default:''}</textarea>
		</div>
		<br />
		<div style="clear: both;">
			<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="10000000"> Upload
			File: <INPUT NAME="uploaded_file" TYPE="file">
			<p>
				<input type=submit name=submit value="Enregistrer">
			</p>

		</div>

	</form>



	{if isset($smarty.get.id)}
	<div>
		{$nomfichier|default:''} {$path|default:''} <a
			href="index.php?traveau=3&id={$idtravaux}&idcour={$idcour}&deletefile=1">Delete</a>
	</div>


	{/if}

	<div>
		<table id="#ver-zebra">
			<colgroup style="padding: 10px;">
				<col class="vzebra-odd">
				<col class="vzebra-even">
				<col class="vzebra-odd">
				<col class="vzebra-even">
				<col class="vzebra-odd">
				<col class="vzebra-even">
				<col class="vzebra-odd">
				<col class="vzebra-even">
			</colgroup>


			<thead>
				<tr style="padding: 10px;">
					<th id="vzebra-comedy" scope="col">ID</th>
					<th id="vzebra-adventure" scope="col">Titre</th>
					<th id="vzebra-action" scope="col">Tipe de travaux</th>
					<th id="vzebra-children" scope="col">Description</th>
					<th id="vzebra-cour" scope="col">Cour</th>
					<th id="vzebra-fichier" scope="col">Fichier</th>
					<th id="vzebra-edit" scope="col">-----</th>
					<th id="vzebra-delete" scope="col">--------</th>
				</tr>
			</thead>
			<tbody>
				{foreach from=$donnetravaux item=row}
				<tr style="padding: 10px;">
					<td>{$row.id_travaux}</td>
					<td>{$row.nomtravaux}</td>
					<td>{$row.typetravaux}</td>
					<td>{$row.description}</td>
					<td>{$row.nomcour}</td>
					<td><a href="{$row.path}">{$row.nomfichier}</a>
					</td>
					<td><a
						href="index.php?traveau=3&id={$row.id_travaux}&idcour={$row.id_cours}">Edit</a>
					</td>
					<td><a
						href="index.php?traveau=1&delete=1&id={$row.id_travaux}&idcour={$row.id_cours}">Delete</a>
					</td>

				</tr>
				{/foreach}
			</tbody>
		</table>
	</div>